-- GENERATED SPELL FOR [Citizen of New Avalon] --


function spell0_28942(pUnit, Event) --@Cornered and Enraged!,Self--
pUnit:FullCastSpellOnTarget(52262,pUnit)
pUnit:RegisterEvent('Sorts_28942', 671, 1)
end

function spell1_28942(pUnit, Event) --@Terrified,Self--
pUnit:FullCastSpellOnTarget(52716,pUnit)
pUnit:RegisterEvent('Sorts_28942', 15000, 1)
end

function Sorts_28942(pUnit, Event)
local choix_sorts_28942 = math.random(0, 1)
if choix_sorts_28942 == 0 then
pUnit:RegisterEvent('spell0_28942', 1, 1)
end
if choix_sorts_28942 == 1 then
pUnit:RegisterEvent('spell1_28942', 1, 1)
end
end

function mob28942_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_28942', math.random(1500, 3000), 1)
end

function mob28942_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28942_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28942_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(28942, 1, 'mob28942_Action')
RegisterUnitEvent(28942, 2, 'mob28942_Leave')
RegisterUnitEvent(28942, 3, 'mob28942_Kill')
RegisterUnitEvent(28942, 4, 'mob28942_Die')
